{template 'common/header'}

<ul class="nav nav-tabs">
	<li{if $operation == 'display'} class="active" {/if}><a href="{php echo $this->createWebUrl('content',array('op' =>'display'))}">全部内容</a></li>
	<li{if empty($adv['id']) && $operation == 'post'} class="active" {/if}><a href="{php echo $this->createWebUrl('content',array('op' =>'post'))}">添加内容</a></li>
	{if !empty($adv['id']) && $operation == 'post'}<li class="active"><a>编辑内容</a></li>{/if}
	<li style="background-color:red;color:#FFFFFF;"><a href="{php echo $this->createWebUrl('onekeyadlist')}" onclick="return confirm('确认加载默认内容吗？将覆盖你现有数据，请谨慎操作！');return false;">一键加载默认内容</a></li>
</ul>

{if $operation == 'display'}
<div class="panel panel-info">
		<div class="panel-heading">筛选</div>
		<div class="panel-body">
			<form action="./index.php" method="get" class="form-horizontal" role="form" id="form1">
				<input type="hidden" name="c" value="site" />
				<input type="hidden" name="a" value="entry" />
				<input type="hidden" name="m" value="{php echo $this->modulename}" />
				<input type="hidden" name="do" value="content" />
				<div class="form-group">
					<label class="col-xs-12 col-sm-1 control-label" style="width: 5%;">位置</label>
					<div class="col-sm-2 col-xs-12" style="width: 20%;">
                        <select name="keyword1" class="form-control">
						    <option value="" >全部</option>
                            <option value="1" {if $_GPC['keyword1']==1}selected="selected"{/if}>首页顶部轮播</option>
                            <option value="21" {if $_GPC['keyword1']==21}selected="selected"{/if}>首页顶部导航</option>
							<option value="22" {if $_GPC['keyword1']==22}selected="selected"{/if}>首页列表</option>
							<option value="20001" {if $_GPC['keyword1']==20001}selected="selected"{/if}>首页电商banner(轮播)</option>
                            <option value="20002" {if $_GPC['keyword1']==20002}selected="selected"{/if}>首页电商banner(2列)</option>
							<option value="20003" {if $_GPC['keyword1']==20003}selected="selected"{/if}>首页电商banner(4列)</option>
							<option value="10001" {if $_GPC['keyword1']==10001}selected="selected"{/if}>首页电商分类下滑动导航</option>
							<option value="11111" {if $_GPC['keyword1']==11111}selected="selected"{/if}>电商页顶部轮播</option>
                            <option value="21000" {if $_GPC['keyword1']==21000}selected="selected"{/if}>电商页顶部导航</option>
							<option value="20005" {if $_GPC['keyword1']==20005}selected="selected"{/if}>电商页banner(轮播)</option>
                            <option value="20006" {if $_GPC['keyword1']==20006}selected="selected"{/if}>电商页banner(2列)</option>
							<option value="20007" {if $_GPC['keyword1']==20007}selected="selected"{/if}>电商页banner(4列)</option>
							<option value="110" {if $_GPC['keyword1']==110}selected="selected"{/if}>美团页面</option>
							<option value="111" {if $_GPC['keyword1']==111}selected="selected"{/if}>饿了么页面</option>
							<option value="9" {if $_GPC['keyword1']==9}selected="selected"{/if}>个人中心常用工具</option>
							<option value="51" {if $_GPC['keyword1']==51}selected="selected"{/if}>积分兑换中心导航</option>
							<option value="30001" {if $_GPC['keyword1']==30001}selected="selected"{/if}>分享中心轮播</option>
							<option value="88888888" {if $_GPC['keyword1']==88888888}selected="selected"{/if}>未分类</option>
                        </select>
                    </div>
					<div>
						<button class="btn btn-default"><i class="fa fa-search"></i> 搜索</button>
					</div>
				</div>
			</form>
		</div>
</div>
<div class="main panel panel-default">
	<div class="panel-body table-responsive">
		<form action="" method="post">
		<table class="table table-hover">
			<thead class="navbar-inner">
				<tr>
					<th style="width:5%;">排序</th>
					<th>id</th>
					<th>位置</th>
					<th>图片</th>
					<th>标题</th>
					<th>电商平台</th>
					<th>是否显示</th>
					<th style="text-align:right;width:15%;">操作</th>
				</tr>
			</thead>
			<tbody>
				{loop $list $adv}
				<tr>
					<td><input class="form-control" name="displayorder[{$adv['id']}]" value="{$adv['displayorder']}" type="text"></td>
					<td>{$adv['id']}</td>
					<td>
						<div>{if $adv['cateid2']==1}首页顶部轮播{/if}{if $adv['cateid2']==21}首页顶部导航{/if}{if $adv['cateid2']==22}首页列表{/if}{if $adv['cateid2']==20001}首页电商banner(轮播){/if}{if $adv['cateid2']==20002}首页电商banner(2列){/if}{if $adv['cateid2']==20003}首页电商banner(4列){/if}{if $adv['cateid2']==11111}电商页顶部轮播{/if}{if $adv['cateid2']==21000}电商页顶部导航{/if}{if $adv['cateid2']==20005}电商页banner(轮播){/if}{if $adv['cateid2']==20006}电商页banner(2列){/if}{if $adv['cateid2']==20007}电商页banner(4列){/if}{if $adv['cateid2']>=10001 && $adv['cateid2']<=10010}首页电商分类下导航{/if}{if $adv['cateid2']==110}美团页面{/if}{if $adv['cateid2']==111}饿了么页面{/if}{if $adv['cateid2']==9}个人中心常用工具{/if}{if $adv['cateid2']==51}积分兑换中心导航{/if}{if $adv['cateid2']==30001}分享中心轮播{/if}</div>
					</td>
					<td><img src="{php echo tomedia($adv['thumb'])}" height="35px"/></td>
					<td>{$adv['title']}</td>
					<td>{if $adv['mall_type'] == 'jd'}京东{/if}{if $adv['mall_type'] == 'pdd'}拼多多{/if}{if $adv['mall_type'] == 'wph'}唯品会{/if}{if $adv['mall_type'] == 'tb'}淘宝{/if}{if $adv['mall_type'] == 'youxuan'}美团优选{/if}</td>
					<td>{if $adv['is_show']==1}是{else}否{/if}</td>
					<td style="text-align:right;">
					    <a href="{php echo $this->createWebUrl('content', array('op' => 'show', 'id' => $adv['id'], 'keyword1' => $_GPC['keyword1']))}" class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="top" title="{if $adv['is_show'] == 1}隐藏{/if}">{if $adv['is_show'] == 1}隐藏{/if}{if $adv['is_show'] == 0}显示{/if}</a>
						<a href="{php echo $this->createWebUrl('content', array('op' => 'post', 'id' => $adv['id'], 'keyword1' => $_GPC['keyword1']))}" class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="top" title="修改"><i class="fa fa-edit"></i></a>
						<a href="{php echo $this->createWebUrl('content', array('op' => 'delete', 'id' => $adv['id'], 'keyword1' => $_GPC['keyword1']))}"class="btn btn-default btn-sm" onclick="return confirm('此操作不可恢复，确认删除？');return false;" data-toggle="tooltip" data-placement="top" title="删除"><i class="fa fa-times"></i></a>
					</td>
				</tr>
				{/loop}
				<tr>
					<td colspan="6">
						<input name="submit" class="btn btn-primary" value="提交" type="submit">
						<input name="token" value="{$_W['token']}" type="hidden">
					</td>
				</tr>
			</tbody>
		</table>
		</form>
	</div>
</div>
<script>
	require(['bootstrap'],function($){
		$('.btn').hover(function(){
			$(this).tooltip('show');
		},function(){
			$(this).tooltip('hide');
		});
	});
</script>
{elseif $operation == 'post'}

<div class="main">
	<form action="" method="post" class="form-horizontal form" enctype="multipart/form-data" onsubmit='return formcheck()'>
		<input type="hidden" name="id" value="{$adv['id']}" />
		<div class="panel panel-default">
			<div class="panel-heading">
				内容设置
			</div>
			<div class="panel-body">
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">排序：</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" name="data[displayorder]" class="form-control" value="{$adv['displayorder']}" />
						<span class="help-block">降序</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">位置：</label>
					<div class="col-sm-9 col-xs-12">
						<label class="radio-inline"><input type="radio" name="cateid" value="1" {if $adv['cateid2'] == 1}checked="true"{/if} /> 首页顶部轮播</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="cateid" value="21" {if $adv['cateid2'] == 21}checked="true"{/if} /> 首页顶部导航</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="cateid" value="22" {if $adv['cateid2'] == 22}checked="true"{/if} /> 首页列表</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="cateid" value="20001" {if $adv['cateid2'] == 20001}checked="true"{/if} /> 首页电商banner(轮播)</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="cateid" value="20002" {if $adv['cateid2'] == 20002}checked="true"{/if} /> 首页电商banner(2列)</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="cateid" value="20003" {if $adv['cateid2'] == 20003}checked="true"{/if} /> 首页电商banner(4列)</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="cateid" value="10001" {if $adv['cateid2'] == 10001}checked="true"{/if} /> 首页电商分类下导航</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="cateid" value="11111" {if $adv['cateid2'] == 11111}checked="true"{/if} /> 电商页顶部轮播</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="cateid" value="21000" {if $adv['cateid2'] == 21000}checked="true"{/if} /> 电商页顶部导航</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="cateid" value="20005" {if $adv['cateid2'] == 20005}checked="true"{/if} /> 电商页banner(轮播)</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="cateid" value="20006" {if $adv['cateid2'] == 20006}checked="true"{/if} /> 电商页banner(2列)</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="cateid" value="20007" {if $adv['cateid2'] == 20007}checked="true"{/if} /> 电商页banner(4列)</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="cateid" value="110" {if $adv['cateid2'] == 110}checked="true"{/if} /> 美团页面</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="cateid" value="111" {if $adv['cateid2'] == 111}checked="true"{/if} /> 饿了么页面</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="cateid" value="9" {if $adv['cateid2'] == 9}checked="true"{/if} /> 个人中心常用工具</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="cateid" value="51" {if $adv['cateid2'] == 51}checked="true"{/if} /> 积分兑换中心导航</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="cateid" value="30001" {if $adv['cateid2'] == 30001}checked="true"{/if} /> 分享中心轮播</label>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">是否关注公众号才显示：</label>
					<div class="col-sm-9 col-xs-12">
					    <label class="radio-inline"><input type="radio" name="data[is_ios]" value="0" {if $adv['is_ios'] == 0}checked="true"{/if}{if !$adv['is_ios']}checked="true"{/if} /> 不限制</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="data[is_ios]" value="1" {if $adv['is_ios'] == 1}checked="true"{/if} /> 关注才显示</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="data[is_ios]" value="2" {if $adv['is_ios'] == 2}checked="true"{/if} /> 没关注才显示</label>
						<span class="help-block" style="color:#f00">是否关注公众号才显示</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">是否有推荐人才显示：</label>
					<div class="col-sm-9 col-xs-12">
					    <label class="radio-inline"><input type="radio" name="data[elmwm_act_id]" value="0" {if $adv['elmwm_act_id'] == 0}checked="true"{/if}{if !$adv['elmwm_act_id']}checked="true"{/if} /> 不限制</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="data[elmwm_act_id]" value="1" {if $adv['elmwm_act_id'] == 1}checked="true"{/if} /> 有推荐人才显示</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="data[elmwm_act_id]" value="2" {if $adv['elmwm_act_id'] == 2}checked="true"{/if} /> 没有推荐人才显示</label>
						<span class="help-block" style="color:#f00">是否有推荐人才显示</span>
					</div>
				</div>

				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">标题：</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" id='title' name="data[title]" class="form-control" value="{$adv['title']}" />
						<span class="help-block" style="color:#f00">*如果前端样式为导航按钮，则标题显示为导航按钮文字，如果前端样式为图片，则不显示，如果前端样式为优惠券或卡片，则显示为优惠券或卡片的标题</span>
					</div>
				</div>
				
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">图片：</label>
					<div class="col-sm-9 col-xs-12">
						{php echo tpl_form_field_image('data[thumb]', $adv['thumb'], '', array('extras' => array('text' => 'readonly')))}
						<span class="help-block" style="color:#f00">*<a id="fenxiang1" {if $adv['cateid2'] == 30001}{else}style="display:none;"{/if}>轮播图片尺寸：750*250，</a><a id="fenxiang2" {if $adv['cateid2'] != 30001}{else}style="display:none;"{/if}>如果前端样式为导航按钮，则为导航按钮图片，如果前端样式为图片，则为图片，如果前端样式为优惠券，则不显示，如果前端样式为卡片，则为卡片的图片</a></span>
					</div>
				</div>
				<div class="form-group" id="mall_thumb" {if $adv['cateid2'] >= 10001 && $adv['cateid2'] <= 10010}{else}style="display:none;"{/if}>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">首页电商分类下导航图片：</label>
					<div class="col-sm-9 col-xs-12">
						{php echo tpl_form_field_image('data[mall_thumb]', $adv['mall_thumb'], '', array('extras' => array('text' => 'readonly')))}
					</div>
				</div>
				<div class="form-group" id="pic_style" {if $adv['cateid2'] >= 10001 && $adv['cateid2'] <= 10010}{else}style="display:none;"{/if}>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">首页电商分类下导航图片样式：</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" id='title' name="data[pic_style]" class="form-control" value="{if $adv['pic_style']}{$adv['pic_style']}{else}{/if}" />
						<span id="index_mall_nav_style" class="help-block" style="color:#f00;">默认为：width:150rpx;height:150rpx;margin:20rpx 10rpx 20rpx 10rpx;  其中width为宽度，height为高度，margin里面4个数值为上右下左的间距，其他样式请自行设置，手机屏幕总宽度为750rpx；其他常用样式：border-radius: 50rpx;（圆角）</span>
					</div>
				</div>
				
				<div class="form-group" id="banner_color" {if $adv['cateid2'] == 20001 || $adv['cateid2'] == 1 || $adv['cateid2'] == 20005 || $adv['cateid2'] == 11111}{else}style="display:none;"{/if}>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">轮播主色调：</label>
					<div class="col-sm-4">
						{php echo tpl_form_field_color('banner_color',$adv['banner_color'])}
						<span id="index_mall_nav_style" class="help-block" style="color:#f00;">*用于改变背景色，达到颜色一致的效果</span>
					</div>
				</div>
				<div class="form-group" id="mall_is_show" style="display:none;">
						<label class="col-xs-12 col-sm-3 col-md-2 control-label">首页电商分类下导航是否显示：</label>
						<div class="col-sm-9 col-xs-12">
							<label class="radio-inline"><input type="radio" name="data[mall_is_show]" value="1" checked="true" /> 显示</label>
						</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">操作类型：</label>
					<div class="col-sm-9 col-xs-12">
					    <label class="radio-inline"><input type="radio" name="adtype" value="14" {if $adv['adtype'] == 14}checked="true"{/if} /> 聚推客转链跳转小程序</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="adtype" value="15" {if $adv['adtype'] == 15}checked="true"{/if} /> 聚推客转链客服回复H5</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="adtype" value="1" {if $adv['adtype'] == 1}checked="true"{/if} /> 跳转小程序</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="adtype" value="2" {if $adv['adtype'] == 2}checked="true"{/if} /> 客服回复图片+文字</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="adtype" value="3" {if $adv['adtype'] == 3}checked="true"{/if} /> 客服回复图文链接</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="adtype" value="9" {if $adv['adtype'] == 9}checked="true"{/if} /> 客服回复转链（电商）</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="adtype" value="4" {if $adv['adtype'] == 4}checked="true"{/if} /> 小程序内部链接</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="adtype" value="5" {if $adv['adtype'] == 5}checked="true"{/if} /> 网页链接</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="adtype" value="8" {if $adv['adtype'] == 8}checked="true"{/if} /> 电商API链接</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="adtype" value="6" {if $adv['adtype'] == 6}checked="true"{/if} /> 分享好友（首页导航有效）</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="adtype" value="7" {if $adv['adtype'] == 7}checked="true"{/if} /> 订阅消息</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="adtype" value="10" {if $adv['adtype'] == 10}checked="true"{/if} /> 添加到我的小程序</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="adtype" value="12" {if $adv['adtype'] == 12}checked="true"{/if} /> 打开图片</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="adtype" value="13" {if $adv['adtype'] == 13}checked="true"{/if} /> 电商商品/活动</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="adtype" value="11" {if $adv['adtype'] == 11}checked="true"{/if} /> 无操作（仅展示）</label>
					</div>
				</div>
				<div class="form-group" id="open_thumb" {if $adv['adtype'] == 12}{else}style="display:none;"{/if}>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">打开的图片：</label>
					<div class="col-sm-9 col-xs-12">
						{php echo tpl_form_field_image('data[open_thumb]', $adv['open_thumb'], '', array('extras' => array('text' => 'readonly')))}
						<span class="help-block" style="color:red;">*新版微信支持直接识别二维码</span>
					</div>
				</div>
				<div class="form-group" id="goods_id" {if $adv['adtype'] == 13}{else}style="display:none;"{/if}>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">电商商品id/活动url：</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" id='title' name="data[goods_id]" class="form-control" value="{if $adv['goods_id']}{$adv['goods_id']}{else}{/if}" />
						<span class="help-block" style="color:red;">*商品格式：goods|商品id，如：goods|44543341334</span>
						<span class="help-block" style="color:red;">*店铺格式：shop|店铺id，如：shop|1655544</span>
						<span class="help-block" style="color:red;">*活动url：url|活动url，如：url|https://d.cn/ddjkkls，url需要进行编码处理</span>
						<span class="help-block" style="color:red;">*商品淘口令：tkl|淘口令，如：tkl|￥4bacXi1oXAk￥</span>
						<span class="help-block" style="color:red;">*淘宝联盟活动：act|活动id，如：act|20150318020003158</span>
					</div>
				</div>
				<div class="form-group" id="adtype1_1" {if $adv['adtype'] == 1}{else}style="display:none;"{/if}>
						<label class="col-xs-12 col-sm-3 col-md-2 control-label">跳转小程序类型：</label>
						<div class="col-sm-9 col-xs-12">
							<label class="radio-inline"><input type="radio" name="appid_type" value="11" {if $adv['appid_type2'] == 11}checked="true"{/if} /> 美团外卖红包</label>
							&nbsp;&nbsp;&nbsp;
							<label class="radio-inline"><input type="radio" name="appid_type" value="12" {if $adv['appid_type2'] == 12}checked="true"{/if} /> 美团闪购红包</label>
							&nbsp;&nbsp;&nbsp;
							<label class="radio-inline"><input type="radio" name="appid_type" value="13" {if $adv['appid_type2'] == 13}checked="true"{/if} /> 美团优选</label>
							&nbsp;&nbsp;&nbsp;
							<label class="radio-inline"><input type="radio" name="appid_type" value="14" {if $adv['appid_type2'] == 14}checked="true"{/if} /> 美团分销联盟吃喝玩乐优惠券</label>
							&nbsp;&nbsp;&nbsp;
							<label class="radio-inline"><input type="radio" name="appid_type" value="15" {if $adv['appid_type2'] == 15}checked="true"{/if} /> 美团分销联盟酒店红包</label>
							&nbsp;&nbsp;&nbsp;
							<label class="radio-inline"><input type="radio" name="appid_type" value="21" {if $adv['appid_type2'] == 21}checked="true"{/if} /> 饿了么外卖红包</label>
							&nbsp;&nbsp;&nbsp;
							<label class="radio-inline"><input type="radio" name="appid_type" value="22" {if $adv['appid_type2'] == 22}checked="true"{/if} /> 饿了么果蔬商超红包</label>
							&nbsp;&nbsp;&nbsp;
							<label class="radio-inline"><input type="radio" name="appid_type" value="0" {if $adv['appid_type2'] == 0}checked="true"{/if} /> 跳其他小程序</label>
						</div>
				</div>
				<div class="form-group" id="mall_type" {if $adv['adtype'] == 14 || $adv['adtype'] == 15}style="display:none;"{else}{/if}>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">电商平台：</label>
					<div class="col-sm-9 col-xs-12">
						<label class="radio-inline"><input type="radio" name="data[mall_type]" value="jd" {if $adv['mall_type'] == jd}checked="true"{/if} /> 京东</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="data[mall_type]" value="pdd" {if $adv['mall_type'] == pdd}checked="true"{/if} /> 拼多多</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="data[mall_type]" value="wph" {if $adv['mall_type'] == wph}checked="true"{/if} /> 唯品会</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="data[mall_type]" value="tb" {if $adv['mall_type'] == tb}checked="true"{/if} /> 淘宝</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="data[mall_type]" value="youxuan" {if $adv['mall_type'] == youxuan}checked="true"{/if} /> 美团优选</label>
						<span class="help-block" style="color:red;">*1、此项用于区分不同电商平台首页内容（../../pagesA/pages/mallA/mallindex?mall_type=），选择哪个平台就在哪个平台首页显示；</span>
						<span class="help-block" style="color:red;">*2、此项也用于区分电商API链接或电商商品/活动属于哪个电商平台；</span>
					</div>
				</div>
				<div class="form-group" id="huodong_banner" {if $adv['adtype'] == 8}{else}style="display:none;"{/if}>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">商品列表顶部图片：</label>
					<div class="col-sm-9 col-xs-12">
						{php echo tpl_form_field_image('data[huodong_banner]', $adv['huodong_banner'], '', array('extras' => array('text' => 'readonly')))}
						<span class="help-block" style="color:red;">*如果为电商商品列表API，请设置顶部图片</span>
					</div>
				</div>
				<div class="form-group" id="huodong_banner_style" {if $adv['adtype'] == 8}{else}style="display:none;"{/if}>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">商品列表顶部图片样式：</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" id='title' name="data[huodong_banner_style]" class="form-control" value="{if $adv['huodong_banner_style']}{$adv['huodong_banner_style']}{else}{/if}" />
						<span class="help-block" style="color:#f00;">默认为：width:750rpx;height:281rpx;  其中width为宽度，height为高度，其他样式请自行设置，手机屏幕总宽度为750rpx；其他常用样式：margin:15rpx 30rpx 15rpx 30rpx;（margin里面4个数值为上右下左的间距）、border-radius: 50rpx;（圆角）</span>
					</div>
				</div>
				<div class="form-group" id="banner_color2" {if $adv['adtype'] == 8 || $adv['cateid2'] == 20002 || $adv['cateid2'] == 20003 || $adv['cateid2'] == 20006 || $adv['cateid2'] == 20007}{else}style="display:none;"{/if}>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label" id="banner_color_1" {if $adv['adtype'] == 8 && ($adv['cateid2'] != 20002 && $adv['cateid2'] != 20003 && $adv['cateid2'] != 20006 && $adv['cateid2'] != 20007)}{else}style="display:none;"{/if}>商品列表页顶部背景色：</label>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label" id="banner_color_2" {if $adv['cateid2'] == 20002 || $adv['cateid2'] == 20003 || $adv['cateid2'] == 20006 || $adv['cateid2'] == 20007}{else}style="display:none;"{/if}>背景色：</label>
					<div class="col-sm-4">
						{php echo tpl_form_field_color('banner_color2',$adv['banner_color2'])}
					</div>
				</div>
				
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">是否弹出订阅提示：</label>
					<div class="col-sm-9 col-xs-12">
						<div class="col-sm-9 col-xs-12">
							<label class="radio-inline"><input type="radio" name="is_warm" value="1" {if $adv['is_warm'] == 1}checked="true"{/if} /> 弹出</label>
							&nbsp;&nbsp;&nbsp;
							<label class="radio-inline"><input type="radio" name="is_warm" value="0" {if $adv['is_warm'] == 0}checked="true"{/if} /> 不弹出</label>
							<span class="help-block" style="color:red;">*是否弹出订阅消息提示</span>
						</div>
						
					</div>
				</div>
				<div class="form-group" id="adtype7_1" {if $adv['is_warm'] == 1}{else}style="display:none;"{/if}>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">弹出订阅消息id：</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" name="data[tplid]" class="form-control" value="{$adv['tplid']}" />
						<span class="help-block" style="color:red;">*多个订阅消息id之间用英文逗号,隔开</span>
					</div>
				</div>
				<div class="form-group" id="adtype7_2" {if $adv['is_warm'] == 1}{else}style="display:none;"{/if}>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">每天弹出订阅次数：</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" name="data[tplid_oneday_num]" class="form-control" value="{if $adv['tplid_oneday_num']}{$adv['tplid_oneday_num']}{else}1{/if}" />
						<span class="help-block" style="color:red;">*每天弹出订阅次数，默认为1次</span>
					</div>
				</div>
				<div class="form-group" id="adtype1_6" {if $adv['adtype'] == 1 && $adv['appid_type2'] > 10 && $adv['appid_type2'] < 20}{else}style="display:none;"{/if}>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">美团api通道：</label>
					<div class="col-sm-9 col-xs-12">
						<div class="col-sm-9 col-xs-12">
						    <label class="radio-inline"><input type="radio" name="meituantype" value="5" {if $adv['meituantype'] == 5}checked="true"{/if} /> 聚推客联盟</label>
							&nbsp;&nbsp;&nbsp;
							<label class="radio-inline"><input type="radio" name="meituantype" value="1" {if $adv['meituantype'] == 1}checked="true"{/if} /> 美团联盟（官方）</label>
							&nbsp;&nbsp;&nbsp;
							<label class="radio-inline"><input type="radio" name="meituantype" value="2" {if $adv['meituantype'] == 2}checked="true"{/if} /> 美团分销联盟（官方）</label>
							&nbsp;&nbsp;&nbsp;
							<label style="display:none;" class="radio-inline"><input type="radio" name="meituantype" value="3" {if $adv['meituantype'] == 3}checked="true"{/if} /> 折淘客</label>
							&nbsp;&nbsp;&nbsp;
							<label style="display:none;" class="radio-inline"><input type="radio" name="meituantype" value="4" {if $adv['meituantype'] == 4}checked="true"{/if} /> 订单侠</label>
						</div>
					</div>
				</div>
				<div class="form-group" id="adtype1_5" {if $adv['adtype'] == 14 || ($adv['adtype'] == 1 && $adv['appid_type2'] > 0)}{else}style="display:none;"{/if}>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">活动id：</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" id="meituan_actid" name="height" class="form-control" value="{$adv['height']}" />
					</div>
				</div>
				
				
				<div class="form-group" id="adtype1_3" {if $adv['adtype'] == 1 && $adv['appid_type2'] == 0}{else}style="display:none;"{/if}>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">跳转小程序appid：</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" name="data[appid]" class="form-control" value="{$adv['appid']}" />
					</div>
				</div>
				<div class="form-group" id="adtype1_4" {if $adv['adtype'] == 1 && $adv['appid_type2'] == 0}{else}style="display:none;"{/if}>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">跳转小程序path：</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" name="data[path]" class="form-control" value="{$adv['path']}" />
					</div>
				</div>
				<div class="form-group" id="adtype2_1" {if $adv['adtype'] == 2}{else}style="display:none;"{/if}>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">客服回复图片：</label>
					<div class="col-sm-9 col-xs-12">
						{php echo tpl_form_field_image('data[reply_thumb]', $adv['reply_thumb'], '', array('extras' => array('text' => 'readonly')))}
						<span class="help-block" style="color:red;">*推荐尺寸640*320</span>
					</div>
				</div>
				<div class="form-group" id="adtype2_2" {if $adv['adtype'] == 2}{else}style="display:none;"{/if}>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">客服回复文字：</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" name="data[reply_text]" class="form-control" value="{$adv['reply_text']}" />
					</div>
				</div>
				<div class="form-group" id="adtype3_1" {if $adv['adtype'] == 3 || $adv['adtype'] == 9 || $adv['adtype'] == 15 || $adv['appid_type2'] == 15}{else}style="display:none;"{/if}>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">客服回复图文标题：</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" name="data[link_title]" class="form-control" value="{$adv['link_title']}" />
					</div>
				</div>
				<div class="form-group" id="adtype3_2" {if $adv['adtype'] == 3 || $adv['adtype'] == 9 || $adv['adtype'] == 15 ||  $adv['appid_type2'] == 15}{else}style="display:none;"{/if}>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">客服回复图文描述文字：</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" name="data[link_desc]" class="form-control" value="{$adv['link_desc']}" />
					</div>
				</div>
				<div class="form-group" id="adtype3_3" {if $adv['adtype'] == 3 || $adv['adtype'] == 9 || $adv['adtype'] == 15 ||  $adv['appid_type2'] == 15}{else}style="display:none;"{/if}>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">客服回复图文图片：</label>
					<div class="col-sm-9 col-xs-12">
						{php echo tpl_form_field_image('data[link_thumb]', $adv['link_thumb'], '', array('extras' => array('text' => 'readonly')))}
						<span class="help-block" style="color:red;">*推荐尺寸200*200</span>
					</div>
				</div>
				<div class="form-group" id="adtype3_4" {if $adv['adtype'] == 3 || $adv['adtype'] == 9 || $adv['adtype'] == 15 ||  $adv['appid_type2'] == 15}{else}style="display:none;"{/if}>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">客服回复图文链接（含电商活动链接、聚推客联盟活动id）：</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" name="data[link_url]" class="form-control" value="{$adv['link_url']}" />
						<span class="help-block" style="color:red;">*电商活动链接请查看下面电商常用API链接，聚推客联盟活动id请<a href="{php echo $this->createWebUrl('malllist',array('type' =>'jutuike'))}" target="_blank" style="color:blue;"><font color="blue">点击此处查看</font></a></span>
					</div>
				</div>
				<div class="form-group" id="adtype4_1" {if $adv['adtype'] == 4 || $adv['adtype'] == 5 || $adv['adtype'] == 8}{else}style="display:none;"{/if}>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label" id="adtype_xcx" {if $adv['adtype'] == 4}{else}style="display:none;"{/if}>小程序内部路径：</label>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label" id="adtype_webview" {if $adv['adtype'] == 5}{else}style="display:none;"{/if}>网页链接：</label>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label" id="adtype_api"{if $adv['adtype'] == 8}{else}style="display:none;"{/if}>电商API链接：</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" name="data[url]" class="form-control" value="{$adv['url']}" />
						<span class="help-block" style="color:red;" id="adtype_xcx2" {if $adv['adtype'] == 4}{else}style="display:none;"{/if}>*小程序内部路径请参考页面下方内容；</span>
						<span class="help-block" id="mall_list_desc" {if $adv['adtype'] == 8}style="color:blue;"{else}style="display:none;color:blue;"{/if}>*常用电商API链接请参考页面下方内容，电商API链接中的页码请用[page]表示（包括括号，下同），每页数据条数请用[pagesize]表示，平台apikey请用[apikey]表示，平台apisecret请用[apisecret]表示（如有），如京东某一主题商品列表：http://api-gw.haojingke.com/index.php/v1/api/jd/themegoods?apikey=[apikey]&pageindex=[page]&pagesize=[pagesize]&themeid=10004（themeid=10004表示主题id为10004）</span>
					</div>
				</div>
				<div class="form-group" id="adtype23_1" {if $adv['adtype'] == 2 || $adv['adtype'] == 3 || $adv['adtype'] == 9 || $adv['adtype'] == 15 ||  $adv['appid_type2'] == 15}{else}style="display:none;"{/if}>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">客服对话框按钮文字：</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" name="data[title_text]" class="form-control" value="{$adv['title_text']}" />
					</div>
				</div>
				<div class="form-group" id="adtype23_2" {if $adv['adtype'] == 2 || $adv['adtype'] == 3 || $adv['adtype'] == 9 || $adv['adtype'] == 15 ||  $adv['appid_type2'] == 15}{else}style="display:none;"{/if}>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">客服对话框提示文字：</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" name="data[title_desc]" class="form-control" value="{$adv['title_desc']}" />
					</div>
				</div>
				<div class="form-group" id="style" {if $adv['cateid2'] == 22}{else}style="display:none;"{/if}>
						<label class="col-xs-12 col-sm-3 col-md-2 control-label">列表样式类型：</label>
						<div class="col-sm-9 col-xs-12">
							<label class="radio-inline"><input type="radio" name="style" value="1" {if $adv['style'] == 1}checked="true"{/if} /> 图片</label>
							&nbsp;&nbsp;&nbsp;
							<label class="radio-inline"><input type="radio" name="style" value="2" {if $adv['style'] == 2}checked="true"{/if} /> 优惠券</label>
							&nbsp;&nbsp;&nbsp;
							<label class="radio-inline"><input type="radio" name="style" value="3" {if $adv['style'] == 3}checked="true"{/if} /> 卡片</label>
						</div>
				</div>
				<div class="form-group" id="style1_1" {if (($adv['cateid2'] == 22 && $adv['style'] == 1) || $adv['cateid2'] == 110 || $adv['cateid2'] == 111 || ($adv['cateid2'] >= 10001 && $adv['cateid2'] <= 10010))}{else}style="display:none;"{/if}>
				    <label class="col-xs-12 col-sm-3 col-md-2 control-label" id="thumb111" {if !$adv['cateid2'] || $adv['cateid2'] == 1 || $adv['cateid2'] == 21 || $adv['cateid2'] == 110 || $adv['cateid2'] == 111 || $adv['cateid2'] == 9 || $adv['cateid2'] == 51 || ($adv['cateid2'] >= 20001 && $adv['cateid2'] <= 20003)}{else}style="display:none;"{/if}>图片样式：</label>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label" id="thumb222" {if $adv['cateid2'] == 22 || ($adv['cateid2'] >= 10001 && $adv['cateid2'] <= 10005)}{else}style="display:none;"{/if}>列表图片样式：</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" id='title' name="data[width]" class="form-control" value="{if $adv['width']}{$adv['width']}{else}{/if}" />
						<span id="mtelmstyle" class="help-block" style="color:#f00; {if $adv['cateid2'] == 110 || $adv['cateid2'] == 111}{else}display:none;{/if}">默认为：float:left;width:690rpx;height:250rpx;margin:15rpx 30rpx 15rpx 30rpx;  其中width为宽度，height为高度，margin里面4个数值为上右下左的间距，其他样式请自行设置，手机屏幕总宽度为750rpx；其他常用样式：border-radius: 50rpx;（圆角）</span>
						<span id="indexstyle" class="help-block" style="color:#f00; {if $adv['cateid2'] == 22 || ($adv['cateid2'] >= 10001 && $adv['cateid2'] <= 10010)}{else}display:none;{/if}">默认为：width:750rpx;height:281rpx;  其中width为宽度，height为高度，其他样式请自行设置，手机屏幕总宽度为750rpx；其他常用样式：margin:15rpx 30rpx 15rpx 30rpx;（margin里面4个数值为上右下左的间距）、border-radius: 50rpx;（圆角）</span>
					</div>
				</div>
				<div class="form-group" id="style2_1" {if ($adv['cateid2'] == 22 || $adv['cateid2'] == 10001) && ($adv['style'] == 2 || $adv['style'] == 3)}{else}style="display:none;"{/if}>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">列表内容：背景色</label>
					<div class="col-sm-9 col-xs-12">
					  <input type="text" name="data[waimaitt_list_bgcolor]" class="form-control" placeholder="" value="{$adv['waimaitt_list_bgcolor']}" />
					  <span class="help-block" style="color:red;">*列表内容背景色，默认为白色#FFFFFF</span>
					</div>
				</div>
				<div class="form-group" id="style2_2" {if ($adv['cateid2'] == 22 || $adv['cateid2'] == 10001) && ($adv['style'] == 2 || $adv['style'] == 3)}{else}style="display:none;"{/if}>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">列表内容：左上角图标：</label>
					<div class="col-sm-9 col-xs-12">
						{php echo tpl_form_field_image('data[waimaitt_list_leftupicon]', $adv['waimaitt_list_leftupicon'], '', array('extras' => array('text' => 'readonly')))}
						<span class="help-block" style="color:red;">*推荐尺寸106*106</span>
					</div>
				</div>
				<div class="form-group" id="style2_3" {if ($adv['cateid2'] == 22 || $adv['cateid2'] == 10001) && $adv['style'] == 2}{else}style="display:none;"{/if}>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">列表内容：左下角图标：</label>
					<div class="col-sm-9 col-xs-12">
						{php echo tpl_form_field_image('data[waimaitt_list_leftdownicon]', $adv['waimaitt_list_leftdownicon'], '', array('extras' => array('text' => 'readonly')))}
						<span class="help-block" style="color:red;">*推荐尺寸92*68</span>
					</div>
				</div>
				<div class="form-group" id="style2_4" {if ($adv['cateid2'] == 22 || $adv['cateid2'] == 10001) && $adv['style'] == 2}{else}style="display:none;"{/if}>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">列表内容：金额：</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" name="data[waimaitt_list_jine]" class="form-control" value="{$adv['waimaitt_list_jine']}" />
						<span class="help-block" style="color:red;">*左下角红包金额或其他金额</span>
					</div>
				</div>
				<div class="form-group" id="style2_5" {if ($adv['cateid2'] == 22 || $adv['cateid2'] == 10001) && $adv['style'] == 2}{else}style="display:none;"{/if}>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">列表内容：金额单位：</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" name="data[waimaitt_list_jineunit]" class="form-control" value="{$adv['waimaitt_list_jineunit']}" />
						<span class="help-block" style="color:red;">*左下角红包金额的单位，例如：元</span>
					</div>
				</div>
				<div class="form-group" id="style2_6" {if ($adv['cateid2'] == 22 || $adv['cateid2'] == 10001) && $adv['style'] == 2}{else}style="display:none;"{/if}>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">列表内容：金额右边文字：</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" name="data[waimaitt_list_jinerighttext]" class="form-control" value="{$adv['waimaitt_list_jinerighttext']}" />
						<span class="help-block" style="color:red;">*红包可设置为：今日仅剩231个，其他请自定义</span>
					</div>
				</div>
				<div class="form-group" id="style2_7" {if ($adv['cateid2'] == 22 || $adv['cateid2'] == 10001) && ($adv['style'] == 2 || $adv['style'] == 3)}{else}style="display:none;"{/if}>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">列表内容：右边领取文字：</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" name="data[waimaitt_list_lingqutext]" class="form-control" value="{$adv['waimaitt_list_lingqutext']}" />
						<span class="help-block" style="color:red;">*红包可设置为：免费领取，其他请自定义</span>
					</div>
				</div>
				<div class="form-group" id="style2_8" {if ($adv['cateid2'] == 22 || $adv['cateid2'] == 10001) && ($adv['style'] == 2 || $adv['style'] == 3)}{else}style="display:none;"{/if}>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">列表内容：右边领取文字色：</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" name="data[waimaitt_list_lingqucolor]" class="form-control" value="{$adv['waimaitt_list_lingqucolor']}" />
						<span class="help-block" style="color:red;">*一般为白色：#FFFFFF，其他请自定义</span>
					</div>
				</div>
				<div class="form-group" id="style2_9" {if ($adv['cateid2'] == 22 || $adv['cateid2'] == 10001) && ($adv['style'] == 2 || $adv['style'] == 3)}{else}style="display:none;"{/if}>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">列表内容：右边领取文字背景色：</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" name="data[waimaitt_list_lingqubgcolor]" class="form-control" value="{$adv['waimaitt_list_lingqubgcolor']}" />
						<span class="help-block" style="color:red;">*红包可设置为：#ff5b73，其他请自定义</span>
					</div>
				</div>
				<div class="form-group">
						<label class="col-xs-12 col-sm-3 col-md-2 control-label">手机系统配置：</label>
						<div class="col-sm-9 col-xs-12">
							<label class="radio-inline"><input type="radio" name="data[system_type]" value="0" {if $adv['system_type'] == 0 || !$adv['system_type']}checked="true"{/if} /> 全平台显示</label>
							&nbsp;&nbsp;&nbsp;
							<label class="radio-inline"><input type="radio" name="data[system_type]" value="1" {if $adv['system_type'] == 1}checked="true"{/if} /> IOS系统不显示</label>
						</div>
				</div>
				<div class="form-group" id="mall_index_all" {if $adv['cateid2'] == 1 || $adv['cateid2'] == 21 || $adv['cateid2'] == 20001 || $adv['cateid2'] == 20002 || $adv['cateid2'] == 20003 || $adv['cateid2'] == 11111 || $adv['cateid2'] == 21000 || $adv['cateid2'] == 20005 || $adv['cateid2'] == 20006 || $adv['cateid2'] == 20007}{else}style="display:none;"{/if}>
						<label class="col-xs-12 col-sm-3 col-md-2 control-label">是否在电商聚合页显示：</label>
						<div class="col-sm-9 col-xs-12">
							<label class="radio-inline"><input type="radio" name="data[mall_index_all]" value="0" {if $adv['mall_index_all'] == 0 || !$adv['mall_index_all']}checked="true"{/if} /> 不显示在电商聚合页</label>
							&nbsp;&nbsp;&nbsp;
							<label class="radio-inline"><input type="radio" name="data[mall_index_all]" value="1" {if $adv['mall_index_all'] == 1}checked="true"{/if} /> 在电商聚合页显示</label>
							<span class="help-block" style="color:red;">*是否在电商聚合页显示，不受下面的是否显示选项控制。</span>
						</div>
				</div>
				<div class="form-group">
					    <label class="col-xs-12 col-sm-3 col-md-2 control-label">是否显示：</label>
						<div class="col-sm-9 col-xs-12">
							<label class="radio-inline"><input type="radio" name="data[is_show]" value="1" {if $adv['is_show'] == 1}checked="true"{/if} /> 显示</label>
							&nbsp;&nbsp;&nbsp;
							<label class="radio-inline"><input type="radio" name="data[is_show]" value="0" {if $adv['is_show'] == 0}checked="true"{/if} /> 隐藏</label>
						</div>
				</div>
			</div>
		</div>
		<div class="form-group col-sm-12">
			<input type="submit" name="submit" value="提交" class="btn btn-primary col-lg-1" />
			<input type="hidden" name="token" value="{$_W['token']}" />
		</div>
	</form>
</div>
<br/><br/><br/>
<div class="main">
        <div class="panel panel-default">
			<div class="panel-heading">
				【小程序内部路径、公众号小程序路径】：
			</div>
			<div class="panel-body">
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">小程序内部路径：</label>
					<div class="col-sm-9 col-xs-12">
						<a href="{php echo $this->createWebUrl('malllist',array('type' =>'xcxpath'))}" target="_blank">点击查看</a>
						<span class="help-block" style="color:red;">*类型选择：小程序内部路径</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">公众号小程序路径：</label>
					<div class="col-sm-9 col-xs-12">
						<a href="{php echo $this->createWebUrl('malllist',array('type' =>'gzhpath'))}" target="_blank">点击查看</a>
						<span class="help-block" style="color:red;">*类型选择：小程序内部路径</span>
					</div>
				</div>
			</div>
		</div>
		<br/>
		<ul class="nav nav-tabs" role="tablist" style="display:none;">
		    <li role="presentation" class="active" style="color:red;font-weight:900;"><a href="#myxq" role="tab" data-toggle="tab">蚂蚁星球API链接</a></li>
			<li role="presentation" style="color:blue;font-weight:900;"><a href="#jtk" role="tab" data-toggle="tab">聚推客API链接</a></li>
		</ul>
		<div class="tab-content">
			<div role="tabpanel" class="tab-pane active panel panel-default main" id="myxq">
			<div class="panel-heading">
				【聚推客联盟】活动列表：
			</div>
			<div class="panel-body">
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">【聚推客联盟】活动列表：</label>
					<div class="col-sm-9 col-xs-12">
						<a href="{php echo $this->createWebUrl('malllist',array('type' =>'jutuike'))}" target="_blank">点击查看</a>
					</div>
				</div>
			</div>
			<div class="panel-heading">
				【京东】常用API链接：
			</div>
			<div class="panel-body">
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">【京东】主题列表：</label>
					<div class="col-sm-9 col-xs-12">
						<a href="{php echo $this->createWebUrl('malllist',array('type' =>'jd_themelist'))}" target="_blank">点击查看</a>
						<span class="help-block" style="color:red;">*类型选择：电商API链接</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">【京东】京粉精选商品：</label>
					<div class="col-sm-9 col-xs-12">
						<a href="{php echo $this->createWebUrl('malllist',array('type' =>'jd_getjingfen'))}" target="_blank">点击查看</a>
						<span class="help-block" style="color:red;">*类型选择：电商API链接</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">【京东】品牌列表：</label>
					<div class="col-sm-9 col-xs-12">
						<a href="{php echo $this->createWebUrl('malllist',array('type' =>'jd_brandlist'))}" target="_blank">点击查看</a>
						<span class="help-block" style="color:red;">*类型选择：电商API链接</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">【京东】官方活动：</label>
					<div class="col-sm-9 col-xs-12">
						<a href="{php echo $this->createWebUrl('malllist',array('type' =>'jd_getactivity'))}" target="_blank">点击查看</a>
						<span class="help-block" style="color:red;">*类型选择：客服回复转链（电商）</span>
					</div>
				</div>
			</div>
			<div class="panel-heading">
				【拼多多】常用API链接：
			</div>
			<div class="panel-body">
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">【多多进宝】主题列表：</label>
					<div class="col-sm-9 col-xs-12">
						<a href="{php echo $this->createWebUrl('malllist',array('type' =>'pdd_getthemelist'))}" target="_blank">点击查看</a>
						<span class="help-block" style="color:red;">*类型选择：电商API链接</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">【多多进宝】运营频道商品：</label>
					<div class="col-sm-9 col-xs-12">
						<a href="{php echo $this->createWebUrl('malllist',array('type' =>'pdd_getrecommendgoods'))}" target="_blank">点击查看</a>
						<span class="help-block" style="color:red;">*类型选择：电商API链接</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">【多多进宝】主站频道推广商品：</label>
					<div class="col-sm-9 col-xs-12">
						<a href="{php echo $this->createWebUrl('malllist',array('type' =>'pdd_resource'))}" target="_blank">点击查看</a>
						<span class="help-block" style="color:red;">*类型选择：电商API链接</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">【多多进宝】营销活动：</label>
					<div class="col-sm-9 col-xs-12">
						<a href="{php echo $this->createWebUrl('malllist',array('type' =>'pdd_hongbao'))}" target="_blank">点击查看</a>
						<span class="help-block" style="color:red;">*类型选择：电商API链接</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">【多多进宝】活动推广：</label>
					<div class="col-sm-9 col-xs-12">
					    <input type="text" class="form-control" value="http://api-gw.haojingke.com/index.php/v1/api/pdd/pddresource?apikey=[apikey]&positionid=[positionid]&resource_type=39998&url=" />
						<span class="help-block" style="color:red;">*类型选择：电商API链接，url=后面接官方活动推广url，url需要进行urlencode编码（<a href="http://tool.chinaz.com/tools/urlencode.aspx" target="_blank">点击前往编码</a>），<a href="https://jinbao.pinduoduo.com/promotion/activity-sync" target="_blank">点击打开多多进宝活动推广列表</a></span>
					</div>
				</div>
			</div>
			<div class="panel-heading">
				【淘宝】常用API链接：
			</div>
			<div class="panel-body">
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">淘宝常用API链接：</label>
					<div class="col-sm-9 col-xs-12">
						<a href="{php echo $this->createWebUrl('malllist',array('type' =>'tb_list'))}" target="_blank">点击查看</a>
						<span class="help-block" style="color:red;">*类型选择：电商API链接</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">淘宝官方活动：</label>
					<div class="col-sm-9 col-xs-12">
						<a href="{php echo $this->createWebUrl('malllist',array('type' =>'tb_act'))}" target="_blank">点击查看</a>
						<span class="help-block" style="color:red;">*类型选择：电商商品/活动</span>
					</div>
				</div>
			</div>
			<div class="panel-heading">
				【唯品会】常用API链接：
			</div>
			<div class="panel-body">
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">唯品会小程序API链接：</label>
					<div class="col-sm-9 col-xs-12">
					    <input type="text" class="form-control" value="http://api-gw.haojingke.com/index.php/v1/api/vip/getunionurl?apikey=[apikey]&type=2&chanTag=[positionid]&goods_id=" />
						<span class="help-block" style="color:red;">*类型选择：电商API链接，goods_id=后面接唯享客活动推广url，支持m.vip.com、mst.vip.com域名，url需要进行urlencode编码（<a href="http://tool.chinaz.com/tools/urlencode.aspx" target="_blank">点击前往编码</a>），唯享客活动推广url请去唯享客app获取</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">唯品会官方小程序API链接：</label>
					<div class="col-sm-9 col-xs-12">
						<a href="{php echo $this->createWebUrl('malllist',array('type' =>'wph_xcxlist'))}" target="_blank">点击查看</a>
						<span class="help-block" style="color:red;">*类型选择：电商API链接</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">唯品会频道商品API链接：</label>
					<div class="col-sm-9 col-xs-12">
						<a href="{php echo $this->createWebUrl('malllist',array('type' =>'wph_goodslist1'))}" target="_blank">点击查看</a>
						<span class="help-block" style="color:red;">*类型选择：电商API链接</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">唯品会组货商品API链接：</label>
					<div class="col-sm-9 col-xs-12">
						<a href="{php echo $this->createWebUrl('malllist',array('type' =>'wph_goodslist2'))}" target="_blank">点击查看</a>
						<span class="help-block" style="color:red;">*类型选择：电商API链接</span>
					</div>
				</div>
			</div>
			</div>
		</div>
</div>


<script>
var mtlm_wm_actid = "{if $settings['meituan_waimai_h5_url']}{$settings['meituan_waimai_h5_url']}{else}0{/if}";
var mtlm_sc_actid = "{if $settings['meituan_sc_h5_url']}{$settings['meituan_sc_h5_url']}{else}0{/if}";
var mtlm_yx_actid = "{if $settings['meituan_yx_h5_url']}{$settings['meituan_yx_h5_url']}{else}0{/if}";
var mtfx_wm_actid = "{if $settings['meituangroup_waimai_activity']}{$settings['meituangroup_waimai_activity']}{else}0{/if}";
var mtfx_sc_actid = "{if $settings['meituangroup_sc_activity']}{$settings['meituangroup_sc_activity']}{else}0{/if}";
var mtfx_yx_actid = "{if $settings['meituangroup_yx_activity']}{$settings['meituangroup_yx_activity']}{else}0{/if}";
var mtfx_chwl_actid = "{if $settings['meituangroup_chwl_activity']}{$settings['meituangroup_chwl_activity']}{else}0{/if}";
var mtfx_hotel_actid = "{if $settings['meituangroup_hotel_activity']}{$settings['meituangroup_hotel_activity']}{else}0{/if}";
var elmwm_actid = "{if $settings['elmwm_promotion_scene_id']}{$settings['elmwm_promotion_scene_id']}{else}0{/if}";
var elmsc_actid = "{if $settings['elmsc_promotion_scene_id']}{$settings['elmsc_promotion_scene_id']}{else}0{/if}";
adtype = "{if $adv['adtype']}{$adv['adtype']}{else}1{/if}";
cateid = "{if $adv['cateid2']}{$adv['cateid2']}{else}1{/if}";
appid_type = "{if $adv['appid_type2']}{$adv['appid_type2']}{else}11{/if}";
$("input:radio[name=adtype]").click(function(){
	$("input:radio[name=appid_type]").attr('checked',false);
	$("input:radio[name=meituantype]").attr('checked',false);
	$("input:radio[name=is_warm]").attr('checked',false);
	$("input:radio[name=style]").attr('checked',false);
	$("#meituan_actid").val('');
	var val = $(this).val();
	if(val == 1){
		$("#adtype1_1").show();
		$("#adtype1_3").hide();
		$("#adtype1_4").hide();
		$("#adtype1_5").hide();
		$("#adtype1_6").hide();
		$("#adtype2_1").hide();
		$("#adtype2_2").hide();
		$("#adtype3_1").hide();
		$("#adtype3_2").hide();
		$("#adtype3_3").hide();
		$("#adtype3_4").hide();
		$("#adtype4_1").hide();
		$("#adtype7_1").hide();
		$("#adtype7_2").hide();
		$("#adtype23_1").hide();
		$("#adtype23_2").hide();
		$("#adtype_xcx").hide();
		$("#adtype_xcx2").hide();
		$("#adtype_webview").hide();
		$("#adtype_api").hide();
		$("#mall_list_desc").hide();
		$("#banner_color2").hide();
		$("#banner_color_1").hide();
		$("#banner_color_2").hide();
		$("#huodong_banner").hide();
		$("#huodong_banner_style").hide();
		$("#open_thumb").hide();
		$("#goods_id").hide();
	}else if(val == 2){
		$("#adtype1_1").hide();
		$("#adtype1_3").hide();
		$("#adtype1_4").hide();
		$("#adtype1_5").hide();
		$("#adtype1_6").hide();
		$("#adtype2_1").show();
		$("#adtype2_2").show();
		$("#adtype3_1").hide();
		$("#adtype3_2").hide();
		$("#adtype3_3").hide();
		$("#adtype3_4").hide();
		$("#adtype4_1").hide();
		$("#adtype7_1").hide();
		$("#adtype7_2").hide();
		$("#adtype23_1").show();
		$("#adtype23_2").show();
		$("#adtype_xcx").hide();
		$("#adtype_xcx2").hide();
		$("#adtype_webview").hide();
		$("#adtype_api").hide();
		$("#mall_list_desc").hide();
		$("#banner_color2").hide();
		$("#banner_color_1").hide();
		$("#banner_color_2").hide();
		$("#huodong_banner").hide();
		$("#huodong_banner_style").hide();
		$("#open_thumb").hide();
		$("#goods_id").hide();
	}else if(val == 3 || val == 9 || val == 15){
		$("#adtype1_1").hide();
		$("#adtype1_3").hide();
		$("#adtype1_4").hide();
		$("#adtype1_5").hide();
		$("#adtype1_6").hide();
		$("#adtype2_1").hide();
		$("#adtype2_2").hide();
		$("#adtype3_1").show();
		$("#adtype3_2").show();
		$("#adtype3_3").show();
		$("#adtype3_4").show();
		$("#adtype4_1").hide();
		$("#adtype7_1").hide();
		$("#adtype7_2").hide();
		$("#adtype23_1").show();
		$("#adtype23_2").show();
		$("#adtype_xcx").hide();
		$("#adtype_xcx2").hide();
		$("#adtype_webview").hide();
		$("#adtype_api").hide();
		$("#banner_color2").hide();
		$("#banner_color_1").hide();
		$("#banner_color_2").hide();
		$("#huodong_banner").hide();
		$("#mall_list_desc").hide();
		$("#huodong_banner_style").hide();
		$("#open_thumb").hide();
		$("#goods_id").hide();
		if(val == 15){
			$("#mall_type").hide();
		}else{
			$("#mall_type").show();
		}
	}else if(val == 4){
		$("#adtype1_1").hide();
		$("#adtype1_3").hide();
		$("#adtype1_4").hide();
		$("#adtype1_5").hide();
		$("#adtype1_6").hide();
		$("#adtype2_1").hide();
		$("#adtype2_2").hide();
		$("#adtype3_1").hide();
		$("#adtype3_2").hide();
		$("#adtype3_3").hide();
		$("#adtype3_4").hide();
		$("#adtype4_1").show();
		$("#adtype7_1").hide();
		$("#adtype7_2").hide();
		$("#adtype23_1").hide();
		$("#adtype23_2").hide();
		$("#adtype_xcx").show();
		$("#adtype_xcx2").show();
		$("#adtype_webview").hide();
		$("#adtype_api").hide();
		$("#mall_list_desc").hide();
		$("#banner_color2").hide();
		$("#banner_color_1").hide();
		$("#banner_color_2").hide();
		$("#huodong_banner").hide();
		$("#huodong_banner_style").hide();
		$("#open_thumb").hide();
		$("#goods_id").hide();
	}else if(val == 5 || val == 8){
		$("#adtype1_1").hide();
		$("#adtype1_3").hide();
		$("#adtype1_4").hide();
		$("#adtype1_5").hide();
		$("#adtype1_6").hide();
		$("#adtype2_1").hide();
		$("#adtype2_2").hide();
		$("#adtype3_1").hide();
		$("#adtype3_2").hide();
		$("#adtype3_3").hide();
		$("#adtype3_4").hide();
		$("#adtype4_1").show();
		$("#adtype7_1").hide();
		$("#adtype7_2").hide();
		$("#adtype23_1").hide();
		$("#adtype23_2").hide();
		if(val == 5){
			$("#adtype_xcx").hide();
			$("#adtype_xcx2").hide();
			$("#adtype_webview").show();
			$("#adtype_api").hide();
			$("#mall_list_desc").hide();
			$("#banner_color2").hide();
			$("#banner_color_1").hide();
	    	$("#banner_color_2").hide();
		    $("#huodong_banner").hide();
			$("#huodong_banner_style").hide();
		}else if(val == 8){
			$("#adtype_xcx").hide();
			$("#adtype_xcx2").hide();
			$("#adtype_webview").hide();
			$("#adtype_api").show();
			$("#mall_list_desc").show();
			$("#banner_color2").show();
			$("#banner_color_1").show();
	    	$("#banner_color_2").hide();
		    $("#huodong_banner").show();
			$("#huodong_banner_style").show();
		}
		$("#open_thumb").hide();
		$("#goods_id").hide();
	}else if(val == 6 || val == 12 || val == 11 || val == 10 || val == 13 || val == 14){
		$("#adtype1_1").hide();
		$("#adtype1_3").hide();
		$("#adtype1_4").hide();
		$("#adtype1_5").hide();
		$("#adtype1_6").hide();
		$("#adtype2_1").hide();
		$("#adtype2_2").hide();
		$("#adtype3_1").hide();
		$("#adtype3_2").hide();
		$("#adtype3_3").hide();
		$("#adtype3_4").hide();
		$("#adtype4_1").hide();
		$("#adtype7_1").hide();
		$("#adtype7_2").hide();
		$("#adtype23_1").hide();
		$("#adtype23_2").hide();
		$("#mall_list_desc").hide();
		$("#banner_color2").hide();
		$("#banner_color_1").hide();
	    $("#banner_color_2").hide();
		$("#huodong_banner").hide();
		$("#huodong_banner_style").hide();
		if(val == 12){
			$("#open_thumb").show();
		}else{
			$("#open_thumb").hide();
		}
		if(val == 13){
			$("#goods_id").show();
		}else{
			$("#goods_id").hide();
		}
		if(val == 14){
			$("#adtype1_5").show();
			$("#mall_type").hide();
		}else{
			$("#adtype1_5").hide();
			$("#mall_type").show();
		}
	}else if(val == 7){
		$("#adtype1_1").hide();
		$("#adtype1_3").hide();
		$("#adtype1_4").hide();
		$("#adtype1_5").hide();
		$("#adtype1_6").hide();
		$("#adtype2_1").hide();
		$("#adtype2_2").hide();
		$("#adtype3_1").hide();
		$("#adtype3_2").hide();
		$("#adtype3_3").hide();
		$("#adtype3_4").hide();
		$("#adtype4_1").hide();
		$("#adtype7_1").hide();
		$("#adtype7_2").hide();
		$("#adtype23_1").hide();
		$("#adtype23_2").hide();
		$("#mall_list_desc").hide();
		$("#banner_color2").hide();
		$("#banner_color_1").hide();
	    $("#banner_color_2").hide();
		$("#huodong_banner").hide();
		$("#huodong_banner_style").hide();
		$("#open_thumb").hide();
		$("#goods_id").hide();
	}
	if($("input:radio[name=cateid]:checked").val() == 20002 || $("input:radio[name=cateid]:checked").val() == 20003 || $("input:radio[name=cateid]:checked").val() == 20006 || $("input:radio[name=cateid]:checked").val() == 20007){
		if(val == 8){
			$("#banner_color2").show();
			$("#banner_color_1").show();
			$("#banner_color_2").hide();
		}else{
			$("#banner_color2").show();
			$("#banner_color_1").hide();
			$("#banner_color_2").show();
		}
		
	}
});
$("input:radio[name=appid_type]").click(function(){
	$("input:radio[name=meituantype]").attr('checked',false);
	$("#meituan_actid").val('');
	appid_type = $(this).val();
	if(appid_type == 0){
		$("#adtype1_5").hide();
		$("#adtype1_6").hide();
		$("#adtype1_3").show();
		$("#adtype1_4").show();
		$("#adtype3_1").hide();
		$("#adtype3_2").hide();
		$("#adtype3_3").hide();
		$("#adtype3_4").hide();
		$("#adtype23_1").hide();
		$("#adtype23_2").hide();
	}else if(appid_type > 20 && appid_type < 30){
		$("#adtype1_5").show();
		$("#adtype1_6").hide();
		$("#adtype1_3").hide();
		$("#adtype1_4").hide();
		$("#adtype3_1").hide();
		$("#adtype3_2").hide();
		$("#adtype3_3").hide();
		$("#adtype3_4").hide();
		$("#adtype23_1").hide();
		$("#adtype23_2").hide();
		if(appid_type == 21){
			$("#meituan_actid").val(elmwm_actid);
		}else if(appid_type == 22){
			$("#meituan_actid").val(elmsc_actid);
		}
	}else if(appid_type > 10 && appid_type < 20){
		$("#adtype1_5").show();
		$("#adtype1_6").show();
		$("#adtype1_3").hide();
		$("#adtype1_4").hide();
		$("#adtype3_1").hide();
		$("#adtype3_2").hide();
		$("#adtype3_3").hide();
		$("#adtype3_4").hide();
		$("#adtype23_1").hide();
		$("#adtype23_2").hide();
	}
});
$("input:radio[name=meituantype]").click(function(){
	var meituantype = $(this).val();
	if(appid_type == 11 && meituantype == 1){
		$("#meituan_actid").val('2');
	}else if(appid_type == 12 && meituantype == 1){
		$("#meituan_actid").val('4');
	}else if(appid_type == 13 && meituantype == 1){
		$("#meituan_actid").val('22');
	}else if(appid_type == 14 && meituantype == 1){
		$("#meituan_actid").val('0');
	}else if(appid_type == 15 && meituantype == 1){
		$("#meituan_actid").val('0');
	}else if(appid_type == 11 && meituantype == 2){
		$("#meituan_actid").val(mtfx_wm_actid);
	}else if(appid_type == 12 && meituantype == 2){
		$("#meituan_actid").val(mtfx_sc_actid);
	}else if(appid_type == 13 && meituantype == 2){
		$("#meituan_actid").val(mtfx_yx_actid);
	}else if(appid_type == 14 && meituantype == 2){
		$("#meituan_actid").val(mtfx_chwl_actid);
	}else if(appid_type == 15 && meituantype == 2){
		$("#meituan_actid").val(mtfx_hotel_actid);
	}else if(appid_type == 11 && meituantype == 3){
		$("#meituan_actid").val('2');
	}else if(appid_type == 12 && meituantype == 3){
		$("#meituan_actid").val('4');
	}else if(appid_type == 13 && meituantype == 3){
		$("#meituan_actid").val('22');
	}else if(appid_type == 14 && meituantype == 3){
		$("#meituan_actid").val('0');
	}else if(appid_type == 15 && meituantype == 3){
		$("#meituan_actid").val('0');
	}else if(appid_type == 11 && meituantype == 4){
		$("#meituan_actid").val('2');
	}else if(appid_type == 12 && meituantype == 4){
		$("#meituan_actid").val('4');
	}else if(appid_type == 13 && meituantype == 4){
		$("#meituan_actid").val('22');
	}else if(appid_type == 14 && meituantype == 4){
		$("#meituan_actid").val('0');
	}else if(appid_type == 15 && meituantype == 4){
		$("#meituan_actid").val('0');
	}else if(appid_type == 11 && meituantype == 5){
		$("#meituan_actid").val('2');
	}else if(appid_type == 12 && meituantype == 5){
		$("#meituan_actid").val('4');
	}else if(appid_type == 13 && meituantype == 5){
		$("#meituan_actid").val('22');
	}else if(appid_type == 14 && meituantype == 5){
		$("#meituan_actid").val(mtfx_chwl_actid);
	}else if(appid_type == 15 && meituantype == 5){
		$("#meituan_actid").val(mtfx_hotel_actid);
	}
});

$("input:radio[name=cateid]").click(function(){
	$("input:radio[name=is_warm]").attr('checked',false);
	$("input:radio[name=style]").attr('checked',false);
	cateid = $(this).val();
	$("#adtype7_1").hide();
	$("#adtype7_2").hide();
	if(cateid == 22){
		$("input:radio[name=style]").attr('checked',false);
		$("input:radio[name=adtype]").attr('checked',false);
		$("#style").show();
		$("#style1_1").hide();
		$("#style2_1").hide();
		$("#style2_2").hide();
		$("#style2_3").hide();
		$("#style2_4").hide();
		$("#style2_5").hide();
		$("#style2_6").hide();
		$("#style2_7").hide();
		$("#style2_8").hide();
		$("#style2_9").hide();
		$("#banner_color").hide();
		$("#indexstyle").show();
		$("#mtelmstyle").hide();
		$("#pic_style").hide();
		$("#mall_thumb").hide();
		$("#mall_is_show").hide();
		$("#mall_list_desc").hide();
		$("#thumb111").hide();
		$("#thumb222").show();
		$("#mall_index_all").hide();
	}else if(cateid == 20001 || cateid == 20005){
		$("input:radio[name=style]").attr('checked',false);
		$("input:radio[name=adtype]").attr('checked',false);
		$("#style").hide();
		$("#style1_1").hide();
		$("#style2_1").hide();
		$("#style2_2").hide();
		$("#style2_3").hide();
		$("#style2_4").hide();
		$("#style2_5").hide();
		$("#style2_6").hide();
		$("#style2_7").hide();
		$("#style2_8").hide();
		$("#style2_9").hide();
		$("#banner_color").show();
		$("#indexstyle").hide();
		$("#mtelmstyle").hide();
		$("#pic_style").hide();
		$("#mall_thumb").hide();
		$("#mall_is_show").hide();
		$("#mall_list_desc").hide();
		$("#thumb111").show();
		$("#thumb222").hide();
		$("#mall_index_all").show();
	}else if(cateid >= 20006 && cateid <= 20010){
		$("input:radio[name=style]").attr('checked',false);
		$("input:radio[name=adtype]").attr('checked',false);
		$("#style").hide();
		$("#style1_1").hide();
		$("#style2_1").hide();
		$("#style2_2").hide();
		$("#style2_3").hide();
		$("#style2_4").hide();
		$("#style2_5").hide();
		$("#style2_6").hide();
		$("#style2_7").hide();
		$("#style2_8").hide();
		$("#style2_9").hide();
		$("#banner_color").hide();
		$("#indexstyle").hide();
		$("#mtelmstyle").hide();
		$("#pic_style").hide();
		$("#mall_thumb").hide();
		$("#mall_is_show").hide();
		$("#mall_list_desc").hide();
		$("#thumb111").show();
		$("#thumb222").hide();
		$("#mall_index_all").show();
	}else if(cateid == 110 || cateid == 111){
		$("input:radio[name=style]").attr('checked',false);
		$("input:radio[name=adtype]").attr('checked',false);
		$("#style").hide();
		$("#style1_1").show();
		$("#style2_1").hide();
		$("#style2_2").hide();
		$("#style2_3").hide();
		$("#style2_4").hide();
		$("#style2_5").hide();
		$("#style2_6").hide();
		$("#style2_7").hide();
		$("#style2_8").hide();
		$("#style2_9").hide();
		$("#banner_color").hide();
		$("#indexstyle").hide();
		$("#mtelmstyle").show();
		$("#pic_style").hide();
		$("#mall_thumb").hide();
		$("#mall_is_show").hide();
		$("#mall_list_desc").hide();
		$("#thumb111").show();
		$("#thumb222").hide();
		$("#mall_index_all").hide();
	}else if(cateid >= 10001 && cateid <= 10010){
		$("input:radio[name=style]").attr('checked',false);
		$("input:radio[name=adtype]").attr('checked',false);
		$("#style").hide();
		$("#style1_1").hide();
		$("#style2_1").hide();
		$("#style2_2").hide();
		$("#style2_3").hide();
		$("#style2_4").hide();
		$("#style2_5").hide();
		$("#style2_6").hide();
		$("#style2_7").hide();
		$("#style2_8").hide();
		$("#style2_9").hide();
		$("#banner_color").hide();
		$("#indexstyle").show();
		$("#mtelmstyle").hide();
		$("#pic_style").show();
		$("#mall_thumb").show();
		$("#mall_is_show").hide();
		$("#mall_list_desc").show();
		$("#thumb111").hide();
		$("#thumb222").show();
		$("#mall_index_all").hide();
	}else{
		$("input:radio[name=style]").attr('checked',false);
		$("input:radio[name=adtype]").attr('checked',false);
		$("#style").hide();
		$("#style1_1").hide();
		$("#style2_1").hide();
		$("#style2_2").hide();
		$("#style2_3").hide();
		$("#style2_4").hide();
		$("#style2_5").hide();
		$("#style2_6").hide();
		$("#style2_7").hide();
		$("#style2_8").hide();
		$("#style2_9").hide();
		if(cateid == 1 || cateid == 11111){
			$("#banner_color").show();
			$("#mall_index_all").show();
		}else if(cateid == 21 || cateid == 21000 || cateid == 20002 || cateid == 20003){
			$("#banner_color").hide();
			$("#mall_index_all").show();
		}else{
		    $("#banner_color").hide();
			$("#mall_index_all").hide();
		}
		$("#indexstyle").hide();
		$("#mtelmstyle").hide();
		$("#pic_style").hide();
		$("#mall_thumb").hide();
		$("#mall_is_show").hide();
		$("#mall_list_desc").hide();
		$("#thumb111").show();
		$("#thumb222").hide();
		if(cateid == 30001){
			$("#fenxiang1").show();
			$("#fenxiang2").hide();
		}else{
			$("#fenxiang1").hide();
			$("#fenxiang2").show();
		}
	}
});

$("input:radio[name=style]").click(function(){
	var style = $(this).val();
	if(style == 2 && (cateid == 22 || (cateid >= 10001 && cateid <= 10010))){
		$("#style1_1").hide();
		$("#style2_1").show();
		$("#style2_2").show();
		$("#style2_3").show();
		$("#style2_4").show();
		$("#style2_5").show();
		$("#style2_6").show();
		$("#style2_7").show();
		$("#style2_8").show();
		$("#style2_9").show();
	}else if(style == 3 && (cateid == 22 || (cateid >= 10001 && cateid <= 10010))){
		$("#style1_1").hide();
		$("#style2_1").show();
		$("#style2_2").show();
		$("#style2_3").hide();
		$("#style2_4").hide();
		$("#style2_5").hide();
		$("#style2_6").hide();
		$("#style2_7").show();
		$("#style2_8").show();
		$("#style2_9").show();
	}else if(style == 1 && (cateid == 110 || cateid == 111)){
		$("#style").hide();
		$("#style1_1").show();
		$("#style2_1").hide();
		$("#style2_2").hide();
		$("#style2_3").hide();
		$("#style2_4").hide();
		$("#style2_5").hide();
		$("#style2_6").hide();
		$("#style2_7").hide();
		$("#style2_8").hide();
		$("#style2_9").hide();
	}else if(style == 1 && (cateid == 22 || (cateid >= 10001 && cateid <= 10010))){
		$("#style1_1").show();
		$("#style2_1").hide();
		$("#style2_2").hide();
		$("#style2_3").hide();
		$("#style2_4").hide();
		$("#style2_5").hide();
		$("#style2_6").hide();
		$("#style2_7").hide();
		$("#style2_8").hide();
		$("#style2_9").hide();
	}else{
		$("#style1_1").hide();
		$("#style2_1").hide();
		$("#style2_2").hide();
		$("#style2_3").hide();
		$("#style2_4").hide();
		$("#style2_5").hide();
		$("#style2_6").hide();
		$("#style2_7").hide();
		$("#style2_8").hide();
		$("#style2_9").hide();
	}
});
$("input:radio[name=is_warm]").click(function(){
	var is_warm = $(this).val();
	if(is_warm == 1){
		$("#adtype7_1").show();
		$("#adtype7_2").show();
	}else{
		$("#adtype7_1").hide();
		$("#adtype7_2").hide();
	}
});
</script>
{/if}
{template 'common/footer'}